<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key|htmlentities}" {in name="key" value="NORMAL"}selected{/in}>{$vo|htmlentities}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-score" data-rule="required" min="0" class="form-control" name="row[score]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Expire_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-expire_time" data-rule="required" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[expire_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>-->

    <div class="form-group">
      <label for="c-username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
      <div class="col-xs-12 col-sm-4">
        <input id="c-username" data-rule="required" class="form-control" name="row[username]" type="text" value="">
      </div>
    </div>
    <div class="form-group">
      <label for="c-nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
      <div class="col-xs-12 col-sm-4">
        <input id="c-nickname" data-rule="required" class="form-control" name="row[nickname]" type="text" value="">
      </div>
    </div>
    <div class="form-group">
      <label for="c-password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
      <div class="col-xs-12 col-sm-4">
        <input id="c-password" data-rule="password" class="form-control" name="row[password]" type="password" value="" placeholder="请输入至少6位密码" autocomplete="new-password" />
      </div>
    </div>
    <!--<div class="form-group">
      <label for="c-email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
      <div class="col-xs-12 col-sm-4">
        <input id="c-email" data-rule="email" class="form-control" name="row[email]" type="text" value="">
      </div>
    </div>-->
    <div class="form-group">
      <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
      <div class="col-xs-12 col-sm-4">
        <input id="c-mobile" data-rule="mobile" class="form-control" name="row[mobile]" type="text" value="">
      </div>
    </div>

    <div class="form-group">
      <label class="control-label col-xs-12 col-sm-2">{:__('Member_config_id')}:</label>
      <div class="col-xs-12 col-sm-8">
        <input id="c-member_config_id" data-source="exam/member_config/index" data-params='{"custom[status]":"1"}' class="form-control selectpage" name="row[member_config_id]" type="text" value="">
      </div>
    </div>

    <div class="form-group">
      <label class="control-label col-xs-12 col-sm-2">{:__('only_subject_ids')}:</label>
      <div class="col-xs-12 col-sm-8">
        <input id="c-only_subject_ids" data-source="exam/subject/selectpage" data-params='{"custom[status]":"1","isTree":true}' data-multiple="true" class="form-control selectpage" name="row[only_subject_ids]" type="text" value="">
      </div>
    </div>

    <div class="form-group">
      <label for="c-score" class="control-label col-xs-12 col-sm-2">积分:</label>
      <div class="col-xs-12 col-sm-4">
        <input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="0">
      </div>
    </div>
    <div class="form-group">
      <label for="c-avatar" class="control-label col-xs-12 col-sm-2">{:__('Avatar')}:</label>
      <div class="col-xs-12 col-sm-8">
        <div class="input-group">
          <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[avatar]" type="text" value="">
          <div class="input-group-addon no-border no-padding">
            <span><button type="button" id="faupload-avatar" class="btn btn-danger faupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
            <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
          </div>
          <span class="msg-box n-right" for="c-avatar"></span>
        </div>
        <ul class="row list-inline faupload-preview" id="p-avatar"></ul>
      </div>
    </div>
    <div class="form-group">
      <label class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
      <div class="col-xs-12 col-sm-8">
        {:build_radios('row[gender]', ['1'=>__('Male'), '0'=>__('Female')], 1)}
      </div>
    </div>

    <div class="form-group">
      <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
      <div class="col-xs-12 col-sm-8">
        {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], 'normal')}
      </div>
    </div>
    <div class="form-group layer-footer">
      <label class="control-label col-xs-12 col-sm-2"></label>
      <div class="col-xs-12 col-sm-8">
        <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
      </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
